package com.nt.test.mapper;

import com.nt.test.entity.Form;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface FormMapper {

    @Insert("insert into test_body (bug_num,bug_num_fixed,bug_num_unfixed,tester,test_time,test_result,test_type,browser,test_address)" +
            "values (#{bugNum},#{bugNumFixed},#{bugNumUnfixed},#{tester},#{testTime},#{testResult},#{testType},#{browser},#{testAddress})")
    int insertForm(Form form);

    @Select("select * from test_body")
    @Results({
            @Result(column = "pid",property = "pid"),
            @Result(column = "bug_num",property = "bugNum"),
            @Result(column = "bug_num_fixed",property = "bugNumFixed"),
            @Result(column = "bug_num_unfixed",property = "bugNumUnfixed"),
            @Result(column = "tester",property = "tester"),
            @Result(column = "test_time",property = "testTime"),
            @Result(column = "test_result",property = "testResult"),
            @Result(column = "test_type",property = "testType"),
            @Result(column = "browser",property = "browser"),
            @Result(column = "test_address",property = "testAddress"),
    })
    List<Form> listFroms();

}
